//
//  PhotoViewController+CustomTitle.m
//  YL8G
//
//  Created by gzty1 on 12-8-21.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "PhotoViewController+CustomTitle.h"

@implementation PhotoViewController(CustomTitle)
- (id)init
{
    if (self = [super init])  
    {
        self.title=nil;
    }
    return self;
}

-(void)setTitleWithZoomScale:(float)aZoomScale
{
	NSString* titleStr=[NSString stringWithFormat:@"%.0f%%",aZoomScale*100];
	UILabel * label = [[[UILabel alloc] initWithFrame:CGRectMake(0,0,200,45)] autorelease];
	label.textAlignment=UITextAlignmentCenter;
	label.textColor = [UIColor whiteColor];
	label.font = [UIFont boldSystemFontOfSize:16.0f];
	label.backgroundColor=[UIColor clearColor]; 
	self.navigationItem.titleView = label;
	label.text = titleStr;
}

@end
